//
//  Interface.h
//  Dungeons and Princesses
//
//  Created by John Grange on 10/22/11.
//  Copyright (c) 2011 SD Networks. All rights reserved.
//
//  Base Interface class for both text and gui

#ifndef Dungeons_and_Princesses_Interface_h
#define Dungeons_and_Princesses_Interface_h

#include "Game.h"
#include "Utility.h"
#include "Room.h"
#include "string"
#include <sstream>
#include "Player.h"
#include "LockableContainer.h"
#include "Attack.h"

class Interface {

private:
    
protected:
    
    static const std::string VERSION;
    static const std::string WELCOMEMSG;

    std::string dropObject(std::string objectType, int objectID);
    std::string getObject(std::string objectType, int objectID);

    Game * gamePtr;
    
    // load help from file into strings for display
    
    void attack(string monsterToAttack);
    void dropItem(string itemToBeDropped);
    bool pickUp(string itemToPickUp);
    bool unlock(string direction);
    void dropAll();
    bool hasDoor(string);
    void move(string);
    void attack(Monster *monsterToAttack, AttackType attackToUse);
    bool equipObject(string objectToEquip);
    
    
    
    virtual string getCurrentRoomDescription();
    
    virtual void enterBattle() = 0;
    
    virtual void showRoomInventory(const vector<Listing> * roomInv) = 0;
    
    virtual void showDescription() = 0;
    
    virtual void showPlayerInventory(const vector<Listing> * playerInv) = 0;
    
    virtual void showHelp(vector<std::string> * helpFile) = 0;

    virtual void saveGame() = 0;

public:

    Interface(Game *ptrToCurrentGame);
    virtual void loadInterface() = 0;
    virtual void setupPlayer() = 0;
    virtual void update(string errorMSG = "") = 0;
    virtual int loadGame() = 0;
    virtual void printErrorMsg(string) = 0;


};


#endif
